/**
 * Created by Taro on 16/1/30.
 */
define(function (require, exports, module) {
    var angular = require('angular');
    var util = require('@yunke/core/util').default;

    require('./contract-common');

    var ContractAttribute = angular.module('ContractAttribute', ['ContractCommonService']);

    ContractAttribute.service('contractAttributeService', ['$rootScope','contractCommonService', function ($rootScope, contractCommonService) {
        return{
            attribute_name_text: function(){
                return ['新增','增购','续签'];
            },
            attributeSelected: function(attributeNameSaved,$scopeAttributeName){
                if(attributeNameSaved.length > 0){
                    $.grep(attributeNameSaved, function (o, n) {
                        $scopeAttributeName[o - 1].checked = true;
                    })

                }


            }
        }



    }]);
    module.exports = ContractAttribute;
});